package com.njym.quartz.job;

import com.njym.quartz.service.ReconciliationsService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class ReconciliationsJob implements Job {

    @Autowired
    ReconciliationsService reconciliationsService;

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {

        String name = context.getJobDetail().getJobDataMap().getString("name");
        /*
         *  对账业务逻辑
         *  1、下载支付宝、微信等第三方对账单
         *  2、对比平台与第三方账单并处理异常账单
         *  3、获取机构账单数据
         *  4、对比机构与平台账单
         */
        //@TODO 1，获取机构交易记录    2，调用对账任务
        reconciliationsService.reconciliations(name);

    }

}
